package com.myblog.entity;

    import com.alibaba.fastjson.annotation.JSONField;
    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.extension.activerecord.Model;
    import com.baomidou.mybatisplus.annotation.TableId;
    import java.time.LocalDateTime;
    import com.baomidou.mybatisplus.annotation.TableField;
    import java.io.Serializable;
    import java.util.Date;

    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;
    import org.springframework.format.annotation.DateTimeFormat;

/**
* <p>
    * 
    * </p>
*
* @author lhj
* @since 2022-06-10
*/
    @Data
        @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public class Article extends Model<Article> {

    private static final long serialVersionUID = 1L;

            @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

            /**
            * 文章标题
            */
        @TableField("title")
    private String title;

            /**
            * 文章简介
            */
        @TableField("summary")
    private String summary;

            /**
            * 文章url
            */
        @TableField("article_url")
    private String articleUrl;

            /**
            * 图片url
            */
        @TableField("picture_url")
    private String pictureUrl;

            /**
            * 文章是否置顶,默认为0否
            */
        @TableField("is_top")
    private Integer isTop;

            /**
            * 文章访问量
            */
        @TableField("traffic")
    private Integer traffic;

            /**
            * 点赞数
            */
        @TableField("tags")
    private Integer tags;

            /**
            * 创建时间
            */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    @TableField("create_time")
    private Date createTime;

            /**
            * 更新时间
            */
    @TableField("operate_time")
    private Date operateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
